<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="image" >
<input type="submit" value="上传"  name="wer">
</form>
</body>
</html>
<?php
if(!empty($_POST)){
    if($_FILES['image']['error']==0){
        move_uploaded_file($_FILES['image']['tmp_name'],'./'.$_FILES['image']['name']);
    }else{
        echo'文件上传有误';
    }
    }

?>